package com.wslds.blog.action;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import com.wslds.base.action.BaseAction;
import com.wslds.bean.Type;
import com.wslds.blog.service.TypeService;

@SuppressWarnings("serial")
@Component("testAction")
@Scope("prototype")
public class TestAction extends BaseAction{

	private Type type;
	
	@Resource
	private TypeService typeService;
	
	public String test(){
		System.out.println(type.getSmap().get("test"));
		
		List<Type> list = typeService.getDao().find("type", type);
		
		for ( Type t : list ){
			System.out.println( t.getId() +"-"+ t.getName());
		}
		
		
		return NONE;
	}

	public Type getType() {
		return type;
	}

	public void setType(Type type) {
		this.type = type;
	}

}
